import React from 'react';
import { connect } from 'dva';
import { createForm } from 'rc-form';
import MemberInfo from 'components/MemberInfo';
import { ScaleHypBzfxTemplate } from 'components/scaleHyp';

const NativeScaleHypBzfxPage = (props) => {
  const { dispatch, ...rest } = props;

  // const redirectUrl = `/native/scale_hyp_bzfx?s=app&doctorid=${props.location.query.doctorid}&memberid=${props.location.query.memberid}&hid=${props.location.query.hid}&pid=${props.location.query.pid}`;
  const redirectUrl = `/native/scale_hyp_bzfx?s=app&doctorid=${props.location.query.doctorid}&memberid=${props.location.query.memberid}`;
  
  return (
    <div>
      <MemberInfo {...rest.member} />
      <ScaleHypBzfxTemplate {...props} member={rest.member} redirectUrl={redirectUrl} />
    </div>
  );
};

export default connect(({ family }) => ({ ...family }))(createForm()(NativeScaleHypBzfxPage));
